package JavaDesign.report_5.t_1;

/**
 * @author zouran
 * createDate：2023/10/25  8:30
 */
public class SparrowDecoratorTwo extends Decorator {
    public final int DISTANCE = 20;

    public SparrowDecoratorTwo(Bird bird) {
        super(bird);
    }

    @Override
    public int fly() {
        return bird.fly() + eleFly();
    }

    private int eleFly() {              //装饰者新添加的方法
        return DISTANCE;
    }
}
